import request from '@/api/request'
const getPlans = (params) => {
  return request({
    url: '/plans/list',
    method: 'get',
    params
  })
}
const addTask = (data) => {
  return request({
    url: '/plans/addTask',
    method: 'post',
    data: { ...data }
  })
}

const editTask = (data) => {
  return request({
    url: '/plans/editTask',
    method: 'post',
    data: { ...data }
  })
}

const completeTasks = (data) => {
  return request({
    url: '/plans/completeTasks',
    method: 'post',
    data: { ...data }
  })
}
export default { getPlans, addTask, editTask, completeTasks }
